package cn.wolfcode.domain;

import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Getter

@Setter

@ToString

@NoArgsConstructor

@AllArgsConstructor

@Document(indexName="product")

public class Product {

    @Id

    private String id;

    @Field(analyzer="ik_smart",searchAnalyzer="ik_smart",type = FieldType.Text)

    private String title;

    private Integer price;

    @Field(analyzer="ik_smart",searchAnalyzer="ik_smart",type = FieldType.Text)

    private String intro;

    @Field(type=FieldType.Keyword)

    private String brand;

}